home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / timeeval < prev    next >
Internet Message Format  |  1995-03-31  |  3KB

  1. Path: seq!spell
  2. From: Poul-Henning Kamp <phk@data.fls.dk>
  3. Subject:  v02i011:  timeeval - "Stopwatch" EVAL v1.0, Part01/01
  4. Newsgroups: comp.sources.hp48
  5. Followup-To: comp.sys.hp48
  6. Approved: spell@seq.uncwil.edu
  7.  
  8. Checksum:  227788406 (verify with brik -cv)
  9. Submitted-by: Poul-Henning Kamp <phk@data.fls.dk>
  10. Posting-number: Volume 2, Issue 11
  11. Archive-name: timeeval/part01
  12.  
  13.  
  14. BEGIN_SRC timeeval.s
  15. * TIMEEVAL          Size: 77.5 bytes,  Checksum: #A2C7h
  16. * ========
  17. *
  18. * Source for RPLCOMP & friends...
  19. *
  20. * by phk@data.fls.dk 26oct91
  21. *
  22. * obj -> TIMEEVAL n(ticks) x_ms
  23. *
  24. * Evaluates the object on top of the stack, and returns the time it took in
  25. * ticks of the internal clock and in milli-seconds.
  26. *
  27. * Arguments for <obj> can put put on the stack above it, and results from the
  28. * evaluation will be available above the results of TIMEEVAL.
  29. *
  30. * example:
  31. *          +----------------------+                  +----------------------+
  32. *          |4:                    |                  |4:                    |
  33. *          |3:                    |                  |3:       .908508177527|
  34. *          |2:                65.3|                  |2:                 247|
  35. *          |1:                 SIN|  -> TIMEEVAL ->  |1:           30.151_ms|
  36. *          +----------------------+                  +----------------------+
  37. *
  38. *
  39. * You cannot get SIN onto the stack ?  try this: { SIN } OBJ\-> DROP
  40. *
  41. * The T0 offset is (on my calc, Rev E) 31 ticks, or 3.784_ms.  This is roughly
  42. * the time it takes to evaluate a data-object like "Hello".
  43. *
  44. * WARNINGS:
  45. * =========
  46. *
  47. * The EVAL employed is the "kernel-one", which does not evalute inside lists.
  48. *
  49. * Programs relying on a specific local-env will fail if they use 1GETLAM &c &c.
  50. *
  51. * There is no ERRTRAP built in.
  52. *
  53. ASSEMBLE
  54.     NIBASC /HPHP48-Z/
  55. RPL
  56. ::                    ( 02d9d )
  57.   CK1NOLASTWD         ( 18ab2 )
  58.   ZERO                ( 03fef )
  59.   1LAMBIND            ( 634cf )
  60.   GARBAGE             ( 05f42 )
  61.   CLKTICKS            ( 0eb81 )
  62.   1PUTLAM             ( 615e0 )
  63.   EVAL                ( 06f8e )
  64.   CLKTICKS            ( 0eb81 )
  65.   1GETABND            ( 634b6 )
  66.   bit-                ( 53eb0 )
  67.   #>%                 ( 5435d )
  68.   DUP                 ( 03188 )
  69.   % 8.192             ( 02933 0819200000000000 )
  70.   %/                  ( 2a9fe )
  71.   %3                  ( 2a2f3 )
  72.   RNDXY               ( 2b529 )
  73.   DOEXT               ( 02ada )
  74.     %1                ( 2a2c9 )
  75.     CHR "m"           ( 029bf 6d )
  76.     $ "s"             ( 02a2c 00007 73 )
  77.     umP               ( 10b7c )
  78.     umEND             ( 10b86 )
  79.     SEMI              ( 0312b )
  80.   UM>U                ( 0f33a )
  81.   ;                   ( 0312b )
  82. END_SRC
  83.  
  84. BEGIN_ASC timeeval.asc
  85. %%HP: T(1)A(D)F(.);
  86. "D9D202BA81FEF30FC43624F5018BE00E516E8F6018BE06B4360BE35D53458813
  87. 0339200000000000029180EF9A23F2A2925B2ADA209C2A2FB920D6C2A2070000
  88. 37C7B0168B01B2130A33F0B21307C2A"
  89. END_ASC
  90.  
  91. BYTES: #A2C7h 90
  92.  
  93. BEGIN_UU timeeval.uue
  94. begin 644 timeeval.bin
  95. M2%!(4#0X+5J=+2"K&.\_\$QC0E\0N`[@%>;X!H'K8$MCL#[5-52(,3"3`@``
  96. I````(!D(_JDR+RHIM:*M`LFB\IL";2PJ<```<WP+8;@0*S&@,P\K,0"3
  97. `
  98. end
  99. END_UU
  100.  
  101. -- 
  102. phk@data.fls.dk          ||  A host is a host from coast to coast,
  103. Poul-Henning Kamp      ||  & no one will talk to a host that's close,
  104. FLS DATA A/S          ||  Unless the host (that isn't close)
  105. Phone: (+45) 36 18 12 35  ||  is busy, hung or dead.
  106. Fax:   (+45) 36 18 12 18  ||                 Anon (?) 
  107.  
  108.